const {
  DataTypes
} = require('sequelize');
module.exports = sequelize => {
  const attributes = {
    goods_id: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: null,
      primaryKey: true,
      autoIncrement: true,
      comment: "商品id",
      field: "goods_id"
    },
    goods_name: {
      type: DataTypes.STRING(30),
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "商品名称",
      field: "goods_name"
    },
    goods_area: {
      type: DataTypes.STRING(30),
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "商品产地",
      field: "goods_area"
    },
    goods_intro: {
      type: DataTypes.TEXT,
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "商品简介",
      field: "goods_intro"
    },
    goods_type: {
      type: DataTypes.STRING(30),
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "商品类型",
      field: "goods_type"
    },
    goods_price: {
      type: DataTypes.DECIMAL,
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "商品价格",
      field: "goods_price"
    },
    goods_stock: {
      type: DataTypes.INTEGER,
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "商品库存",
      field: "goods_stock"
    },
    goods_img: {
      type: DataTypes.STRING(1314),
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "商品图片路径",
      field: "goods_img"
    }
  };
  const options = {
    tableName: "goods",
    comment: "",
    indexes: []
  };
  const GoodsModel = sequelize.define("goods_model", attributes, options);
  return GoodsModel;
};